package com.my.test.java.clas;

import java.util.*;

public class InnerClass {

	public InnerClass(){
		for(int i=0;i<1000;i++){
			age += age;
		}
	}
	private String name;
	private int age;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	static class One{
		InnerClass ic;
		public One(InnerClass ic){
			this.ic = ic;
		}
		public Object getTest(){
			System.out.println(ic.name);
			return ic.name;
		}
	}
	class Two{
		InnerClass ic;
		public Two(InnerClass ic){
			this.ic = ic;
		}
		public Object getTest(){
			System.out.println(ic.name);
			return ic.name;
		}
	}
	
//	public static void main(String[] args) {
////		InnerClass in = new InnerClass();
////		in.setName("hzb");
////		One o = new One(in);
////		o.getTest();
////		
////		
////		Two t = in.new Two(in);
////		t.getTest();
//		
//		while(true){
//			List<InnerClass> list = new ArrayList<InnerClass>();
//			System.out.println("start");
//			list.add(new InnerClass());
//		}
//	}
	public static void test(){
		while(true){
			
		}
	}
	public static void main(String[] args) {
		for(int i=0;i<500;i++){
			new Thread(new Runnable() {
				public void run() {
					test();
				}
			}).start();
		}
//        method();
//		List list=new ArrayList();
//        for(;;){
//            int[] tmp=new int[1000000];
//            list.add(tmp);
//        }
    }
    public static void method(){
        for(;;)
            method();
    }
}
